package com.xayy.health.mgt.model;

import cn.kawins.mybatis.base.BaseModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * 配置节点-参数
 * @author zhangxa
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "HEALTH.tb_satellite_param")
@EqualsAndHashCode(callSuper = true)
public class SatelliteParam extends BaseModel<Long> {

    @Id
    @Column(name = "id")
    private Long id;

    @Column(name = "node_id")
    private Long nodeId;

    @Column(name = "param_name")
    @ApiModelProperty(value = "参数名称")
    private String paramName;

    @Transient
    private String name;

    @Column(name = "column_name")
    @ApiModelProperty(value = "字段名")
    private String columnName;

    @Column(name = "telemetry_code")
    @ApiModelProperty(value = "遥测代号")
    private String telemetryCode;

    @Column(name = "param_value")
    @ApiModelProperty(value = "参数值")
    private String paramValue;

    @Column(name = "unit")
    @ApiModelProperty(value = "单位")
    private String unit;

    @Column(name = "upper_limit")
    @ApiModelProperty(value = "上限")
    private String upperLimit;

    @Column(name = "lower_limit")
    @ApiModelProperty(value = "下限")
    private String lowerLimit;

    @Column(name = "weight")
    @ApiModelProperty(value = "权重")
    private Double weight;

    @Column(name = "create_time")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @Column(name = "update_time")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @Override
    public Long idValue() {
        return id;
    }
}
